package net.wanho.shop.mapper;

import net.wanho.shop.po.Role;
import net.wanho.shop.vo.RoleFatherVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author 猛虎王
 * @since 2024-12-24
 */

@Mapper
public interface RoleMapper {

    List<Role> select(Role role);

    Role selectById(Serializable roleId);

    void insert(Role role);

    void update(Role role);

    void deleteById(Serializable roleId);

    void deleteByIds(String[] split);

    Role selectByUserId(Integer useId);

    Role selectByRoleName(String roleName);

    List<Role> selectAll();

    RoleFatherVo selectByRoleId(Integer id);

    void updatePermissions(@Param("roleId") Integer roleId, @Param("ids") String ids);
}
